<?php

if (!defined('BASEPATH'))
    exit('No direct script access allowed');

class Boleto extends CI_Controller {

    public function index() {

        $this->load->library('session');
        $idUsuario = $this->session->userdata['id_usuario'];
        $query = $this->db->get_where('servicos.view_usuario', array('id_usuario' => $idUsuario));
        $info = $query->result_array();
        $dados = array(
            "id_boleto",
            "id_usuario" => $idUsuario,
            "valor_cobrado" => 5.00,
            "nosso_numero" => 20093286447580811,
            "numero_doc" => 0,
            "data_vencimento" => '30/' . date('m/Y'),
            "data_emissao" => date("d/m/Y"),
            "agencia" => 2926,
            "conta" => 110106,
            "convenio" => 1746501,
            "contrato" => 18215047
        );
        $this->load->model('boleto');
        $query = $this->boleto->salvar_boleto($dados);

        if ($query != false) {
            $dados["id_boleto"]=$query;
            include 'application/libraries/boletoPhp/boleto_bb.php';    
        }
        include 'application/libraries/boletoPhp/boleto_bb.php';
    }

}

/* End of file welcome.php */
/* Location: ./application/controllers/login.php */